<?php defined('SYSPATH') OR die('No direct access allowed.');require(BASEPATH.'/data/common.inc.php');//从库配置读取$cfg_slave_open = $cfg_slave_dbhost = $cfg_slave_dbname = $cfg_slave_dbuser = $cfg_slave_dbpwd = '';if(file_exists(BASEPATH.'/data/slave.config.php')){   $slave = include(BASEPATH.'/data/slave.config.php');}$cfg_slave_open = $slave['cfg_slave_open'] ? $slave['cfg_slave_open'] : 0;if($cfg_slave_open){    $cfg_slave_dbhost = $slave['cfg_slave_dbhost'] ? $slave['cfg_slave_dbhost'] : '';    $cfg_slave_dbname = $slave['cfg_slave_dbname'] ? $slave['cfg_slave_dbname'] : '';    $cfg_slave_dbuser = $slave['cfg_slave_dbuser'] ? $slave['cfg_slave_dbuser'] : '';    $cfg_slave_dbpwd = $slave['cfg_slave_dbpwd'] ? $slave['cfg_slave_dbpwd'] : '';}//根据php版本来引入不同的数据库配置文件if(version_compare(PHP_VERSION,'7.0.0','le')){    return include(__DIR__.'/database.php5.php');}else{    return include(__DIR__.'/database.php7.php');}